package com.wenhai.spring.aop.features;

import org.aspectj.lang.annotation.Aspect;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * AspectJ 演示
 *
 * @author wenhai
 * @date   2021/3/4
 */
@Aspect
@Configuration
@EnableAspectJAutoProxy
public class AspectJAnnotationDemo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(AspectJAnnotationDemo.class);
        System.out.println(ctx.getBean(AspectJAnnotationDemo.class).getClass().getName());
        ctx.close();
    }

}
